package com.kplan.plan.action;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.kplan.action.Action;
import com.kplan.plan.dto.BoardDto;
import com.kplan.plan.service.BoardService;

public class BoardViewAction implements Action {
private static BoardViewAction boardViewAction;
	
	static{
		boardViewAction = new BoardViewAction();
	}
	private BoardViewAction(){}
	public static BoardViewAction getInstance(){
		return boardViewAction;
	}
	
	@Override
	public String action(HttpServletRequest request,
			HttpServletResponse response) {
		String bcode = request.getParameter("bcode");
		List<BoardDto> blist = BoardService.getInstance().board(bcode);
		request.setAttribute("boardInfo", blist);
		
		
		return "/board/board.jsp";
	}

}
